set(TRADE_CGO_LIBRARY_VERSION_STRING v1.0.0)
set(TRADE_CGO_LIBRARY_VERSION_EPOCH v1.0.0)
set(TRADE_CGO_LIBRARY_VERSION_MAJOR beta)


include_directories(${PROJECT_SOURCE_DIR}/src/tradecgo/include)
file(GLOB TRADE_CGO_SOURCES
        ${PROJECT_SOURCE_DIR}/src/tradecgo/src/*.cpp
        )
foreach (TRADE_CGO_CPP ${TRADE_CGO_SOURCES})
    message(STATUS "origin ${TRADE_CGO_CPP}")
endforeach ()
add_library(tradecgo_static STATIC ${TRADE_CGO_SOURCES}) #为静态库添加文件
add_library(tradecgo_shared SHARED ${TRADE_CGO_SOURCES}) #为动态库添加文件

target_link_libraries(tradecgo_shared ${TRADE_TRADE_LIBRARIES} ${PYTHON_LIBS})
set_target_properties(tradecgo_static PROPERTIES
        OUTPUT_NAME "tradecgo" #设置输出库的名字
        CLEAN_DIRECT_OUTPUT 1
        #        ARCHIVE_OUTPUT_DIRECTORY staticlib/x64 #设置静态
        )

set_target_properties(tradecgo_shared PROPERTIES
        VERSION ${TRADE_CGO_LIBRARY_VERSION_STRING}
        SOVERSION ${TRADE_CGO_LIBRARY_VERSION_EPOCH}.${TRADE_CGO_LIBRARY_VERSION_MAJOR} #设置库的版本号
        OUTPUT_NAME "tradecgo" #设置输出库的名字
        #        RUNTIME_OUTPUT_DIRECTORY bin/x64 #设置.dll文件的保存路径
        #        ARCHIVE_OUTPUT_DIRECTORY lib/x64
        )
